Development of a DC/DC converter for a LED system using Simulink

Copyright 2020 - 2020 The MathWorks, Inc.
Feedback: Vasco Lenzi, vlenzi@mathworks.com
Webinar recording link
Table of Contents

Before starting

If you get warning such as this one:
do not panic! It simply means that you don't have the Hardware Support Package for TI C2000 installed. This package requires Embedded Coder and is available free of charge at this link
You can still uses models and scripts for the simulation and tuning part - the configuration parameter for hardware implementation is set automatically to "None". If you want to generate code for a F28069 ControlCard, you need to install the Hardware Support Package.

Webinar recording link

Full version, 54 minutes:
https://www.mathworks.com/videos/developing-dc-dc-converter-control-in-simulink-1533829367281.html

Application description

This workflow reference covers the design, analysis, and software development for a Single Ended Primary Inductor Converter, commonly known as SEPIC, which is powered by a 12 Volt lithium-ion battery and is converting voltage to 18 Volt to power 36 LEDs divided in 6 module with each 6 LEDs in series. The developed software include a simplified BMS (battery management system) to watch over the battery status, supervisory logic to coordinate mode of operation and two closed-loop controllers (SEPIC voltage and LEDs current).

Software & Skills Requirements

This is an end-to-end workflow that encompass the role of multiple people. In reality, not everybody in a team would need all the toolboxes. Please contact your local MathWorks office to discuss and scope out toolchain needs.
To fully profit of this reference workflow you would need:
A prerequisite to fully profit from this reference workflow is to take following four onramps (starting from release R2020b):
MATLAB Onramp
Simulink Onramp
Simscape Onramp
Stateflow Onramp
Circuit Simulation Onramp
The onramps are interactive, self-paced tutorial (around 2 hours length), but they are not to be considered formal training. It would be really beneficial to attend following (paid) trainings relevant to this topic:
MATLAB Fundamentals
Simulink for System and Algorithm Modeling
Stateflow for Logic Driven System Modeling
Modeling Physical Systems with Simscape
Power Electronics Control Design with Simulink and Simscape

Components

This project has been deveoped around a Texas instrument LED kit (codename: TMDSDCDCLEDKIT (link to online reference guide)). It uses a F28069 ControlCard.
The reference workflow doesn't need an hardware board for the majority of the discussed topics.
This application is interesting because:

System in action

SystemInAction.gif
You can see in the top left corner the hardware working. On the right top corner there is the model where we pressed once "deploy to hardware" to automatically generate code and load it unto the hardware kit.
Bottom left we see the current of the LEDs (which are powered on and off randomly) regulated to 60 mA. Bottom right corner the voltage is kept at 18 Volt, although you can see spikes when the LED change rapidly status.
Both controllers are PI controllers which were modeled, simulated tuned and verified within the Simulink platform. Because the converter was modeled appropriately, the PI parameters derived in simulation can be used directly on hardware with good results.

Workflow

This demo covers a typical power electronics development workflow, divided in 6 sections. Specific shortcuts based on these sections exist in the Project Shortcuts of the Simulink Project.